﻿
    using System;
namespace YoucaiReader.Helper.Drawing
{
    public class Dimension
    {
        public int height;
        public int width;

        public Dimension()
        {
            this.width = 0;
            this.height = 0;
        }

        public Dimension(Dimension dim)
        {
            this.width = dim.width;
            this.height = dim.height;
        }

        public Dimension(int width, int height)
        {
            this.width = width;
            this.height = height;
        }

        public override bool Equals(object obj)
        {
            if (this != obj)
            {
                if (obj == null)
                {
                    return false;
                }
                if (base.GetType() != obj.GetType())
                {
                    return false;
                }
                Dimension dimension = (Dimension) obj;
                if (this.height != dimension.height)
                {
                    return false;
                }
                if (this.width != dimension.width)
                {
                    return false;
                }
            }
            return true;
        }

        public override int GetHashCode()
        {
            int num = 0x1f;
            int num2 = 1;
            num2 = (num * num2) + this.height;
            return ((num * num2) + this.width);
        }

        public static Dimension UNLIMITED
        {
            get
            {
                return new Dimension(0x7fffffff, 0x7fffffff);
            }
        }
    }
}

